#pragma once

struct FtAxisConfig
{
    unsigned char enableFt = 0;
    unsigned char enableNTrack = 0;
    float ftUser = 100;
    float ftReboundFK = 1;
    float ftConstant = 0;
};

struct FCAxisPara  // force control 参数
{
    // 传感器相关参数
    double torque_sensor_filter = 0;  // 传感器低通滤波参数
    double torque_sensor_limit[6] = {1200, 1200, 1200, 48, 48, 48};
    double torque_sensor_bias[6] = {0, 0, 0, 0, 0, 0};

    // 力控相关参数
    enum FRAME
    {
        FRAME_TOOL = 0,
        FRAME_USER = 1,
    } admit_fc_frame = FRAME_TOOL;
    int compliant_type = 0;    // 力控模式
    int compliant_enable = 0;  // 力控使能
    FtAxisConfig admit_fc_config[6] = {};
    double contact_force_threshold[6] = {0, 0, 0, 0, 0, 0};
    double constant_force_ctrl_tol = 0;         // 恒力力控容差
    double constant_torque_ctrl_tol = 0;        // 恒扭矩力控容差
    double force_ctrl_vel_limit = 1000;         // 力控拖拽速度限制
    double force_ctrl_angular_vel_limit = 120;  // 力控拖拽角速度限制
    double non_contact_vel_limit = 10;          // 非接触力控速度限制
    double non_contact_angular_vel_limit = 1;   // 非接触力控角速度限制

    // 拖拽相关参数
    int force_ref_point = 0;
    FRAME admit_drag_frame = FRAME_TOOL;
    FtAxisConfig admit_drag_config[6] = {};
    double drag_dead_zone[6] = {0, 0, 0, 0, 0, 0};
    double admit_drag_jsensitivity = 0;
    double admit_drag_sigular_threshold = 2;
};